import request from '@/utils/request'
let api = process.env.VUE_APP_PREFIX

// 查询十条ECP信息
export function findECP () {
  return request({
    method: 'get',
    url: `/api/findECP`,
    params: {
      T: new Date().getTime()
    }
  })
}
// 查询十条ECR信息
export function findECR () {
  return request({
    method: 'get',
    url: `${api}/findECR`,
    params: {
      T: new Date().getTime()
    }
  })
}

// 查询十条通知信息
export function findNoticeInfo () {
  return request({
    method: 'get',
    url: `${api}/findNoticeInfo`,
    params: {
      T: new Date().getTime()
    }
  })
}
// 查询预览信息
export function queryInfo () {
  return request({
    method: 'get',
    url: `${api}/queryInfo`
  })
}
// 根据角色名称查询待办任务
export function findTaskByRoleName (params = {
  roleName: ''
}) {
  var T = new Date().getTime()
  params.T = T
  return request({
    method: 'get',
    url: `${api}/findTaskByRoleName`,
    params
  })
}

// 查询最近访问
export function getLastVisited (params = {
  roleName: ''
}) {
  var T = new Date().getTime()
  params.T = T
  return request({
    method: 'get',
    url: `${api}/getLastVisited`,
    params
  })
}
